#ifndef __SMS_ICONLISTVIEW__
#define __SMS_ICONLISTVIEW__

#include <goocanvas.h>

#include "theme.h"
//#include "icon-text-view.h"

typedef struct _IconListView
{
	GooCanvasItem *parent;
	GooCanvasItem *cavas;
	//GooCanvasItem *group;
	GooCanvasItem *frame;
	GooCanvasItem *background;
	GooCanvasItem *showarea;
	
	IconTextView **icontextlist;
	
	gdouble x;
	gdouble y;
	gdouble w;
	gdouble h;
	gdouble h_margins;
	gdouble w_margins;
	gdouble h_spacing;
	gdouble w_spacing;

	int frame_column_num;
	int frame_row_num;
	int show_column_num;
	int show_row_num;

	int cur_focus_icon_x;
	int cur_focus_icon_y;
	int total_icon;
	int cur_page;
	int total_page;
	
	Theme * theme;
}IconListView;

IconListView *iconlist_view_new(GooCanvasItem *parent, gdouble x, gdouble y, 
                                                       GdkPixbuf *pixbuf_bg, GdkPixbuf *pixbuf_showarea,
                                                       gdouble icon_w, gdouble icon_h,
                                                       gdouble h_margins, gdouble w_margins,
                                                       gdouble h_spacing, gdouble w_spacing,
                                                       int total_icon,
                                                       Theme *theme);
IconListView *iconlist_view_new_by_theme(GooCanvasItem *parent, gdouble x, gdouble y, Theme *theme);

IconTextView *iconlist_view_create_icontextview(IconListView *ilv, gdouble x, gdouble y,
                                                                   GdkPixbuf *pixbuf_bg, GdkPixbuf *pixbuf_fg, GdkPixbuf *pixbuf_icon,
                                                                   gdouble icon_x, gdouble icon_y,
                                                                   gdouble text_x, gdouble text_y, gdouble text_w, gchar *text_str,
                                                                   Theme *theme);
//void iconlist_view_set_func(IconListView *ilv, const char *key, gboolean (*func)(IconListView *itv, gpointer data));
void iconlist_view_destroy(IconListView *ilv);
void iconlist_view_free_icontextlist(IconListView *ilv);

gboolean iconlist_view_set_icontextlist(IconListView *ilv, IconTextView **icontextlist);

//gboolean iconlist_view_set_frame_size(IconListView *ilv, GdkPixbuf *pixbuf);
//gboolean iconlist_view_set_background_pic(IconListView *ilv, GdkPixbuf *pixbuf);
//gboolean iconlist_view_set_showarea_size(IconListView *ilv, GdkPixbuf *pixbuf);

gboolean iconlist_view_verial_scroll_list(IconListView *itv, int direct);
gboolean iconlist_view_show(IconListView *ilv);

//Theme *listview_change_theme(Theme *theme, ...);

//gboolean icontext_view_focus_translate(IconTextView *itv, int translate);

//void icontext_view_change_page(IconTextView *itv, int page);
//int icontext_view_get_cur_page(IconTextView *itv);
#endif
